package com.changcheng.project.yuminsi.enums;

/**
 * @author yuminsi
 * @description
 * @date 2020/8/21 10:06
 * @since
 */
public enum CertificateTypes {

    /**
     * 身份证含临时身份证
     */
    IDCARD("身份证含临时身份证", "101", "个人"),
    /**
     * 统一社会信用代码证书
     */
    SOCIALCREDITCODE("统一社会信用代码证书", "201", "单位");

    private String name;
    private String code;
    private String remark;

    CertificateTypes() {
    }

    CertificateTypes(String name, String code, String remark) {
        this.name = name;
        this.code = code;
        this.remark = remark;
    }


    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }

    public String getRemark() {
        return remark;
    }


    public static CertificateTypes getCertificateTypes(String code){
        for (CertificateTypes type : values()){
            if (type.getCode().equals(code)){
                return type;
            }
        }
        return null;
    }

}
